feat(bump): added support for running arbitrary hooks during bump#644
Merged
Lee-W merged 3 commits intocommitizen-tools:masterfrom Feb 8, 2023
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
To make commitizen integrate even better, new configuration keys hooks_pre_bump and hooks_post_bump were added to allow to run arbitrary commands prior to and right after running bump.
I've backported the work done by @janw and slightly adjusted it:
hooks_pre_bumphooks after the versions have been updated but before they are committed and tagged, so additional documentation can be generated with the new version or other generators can be run and staged.Checklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testSteps to Test This Pull Request
cz bumpand notice theRunning hookoutputgit show HEADto seefoo.baris part of the latest releaseAdditional context
Closes: #292
Thanks to @janw to do the heavy lifting here.